Skip to content

SDKs: Add sandbox config - #2371

Open
jcoc611-microsoft wants to merge 3 commits into
mainfrom
user/juosori/Sandbox-RustSDK
Open

SDKs: Add sandbox config#2371
jcoc611-microsoft wants to merge 3 commits into
mainfrom
user/juosori/Sandbox-RustSDK

Conversation

@jcoc611-microsoft

@jcoc611-microsoft jcoc611-microsoft commented Aug 21, 2026

Copy link
Copy Markdown

Summary

Add sandbox configuration support to session creation and resume APIs across all six SDK languages.

  • Expose the generated SandboxConfig and related policy types through each SDK's public session configuration API.
  • Forward the optional configuration as sandboxConfig for both create and resume requests.
  • Preserve omission when sandbox configuration is unset.
  • Add request serialization coverage for create and resume in Rust, Node.js, .NET, Python, Go, and Java.
  • Add an end-to-end create/resume test for each SDK language using the shared replay fixture.

Testing

  • Rust focused serialization test, Clippy with all features and warnings denied, and formatting check
  • Node.js focused unit suite and sandbox E2E
  • .NET focused serialization test and sandbox E2E (net8.0)
  • Python focused unit suite and sandbox E2E
  • Go root tests and sandbox E2E
  • Java request-builder suite and sandbox E2E
  • Prettier, Ruff, gofmt, dotnet format, Spotless, and Checkstyle

@jcoc611-microsoft
jcoc611-microsoft requested review from jmoseley and stephentoub and a balanced review from Copilot and removed request for stephentoub August 21, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Rust SDK sandbox configuration support for session creation and resume.

Changes:

  • Exposes sandbox policy types publicly.
  • Forwards optional sandbox configuration in create/resume requests.
  • Adds nested serialization and omission coverage.
Show a summary per file
File Description
rust/src/wire.rs Adds optional sandbox configuration to wire payloads.
rust/src/types.rs Extends public configs, conversions, exports, redacted debug output, and tests.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@jcoc611-microsoft
jcoc611-microsoft marked this pull request as ready for review August 21, 2026 21:40
@jcoc611-microsoft
jcoc611-microsoft requested a review from a team as a code owner August 21, 2026 21:40
@SteveSandersonMS
SteveSandersonMS marked this pull request as draft August 25, 2026 15:14
@SteveSandersonMS

SteveSandersonMS commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for adding the Rust support. Would you be willing to apply the same improvement across the other five SDK languages (Node, C#, Python, Go, and Java), with at least one end-to-end test for each language?

We aim to keep all six SDKs in sync in capabilities and usage patterns, so landing this only for Rust would leave an avoidable cross-language gap. Please move the PR back out of draft status once the other implementations and E2E coverage are ready for review.

@jcoc611-microsoft jcoc611-microsoft changed the title Rust SDK: Add sandbox config SDKs: Add sandbox config Aug 25, 2026
@jcoc611-microsoft
jcoc611-microsoft marked this pull request as ready for review August 25, 2026 17:30
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds SandboxConfig support consistently across all six SDK implementations:

SDK Client forwarding Type definition Unit/Serialization tests E2E tests
Node.js client.ts types.ts client.test.ts session_config.e2e.test.ts
Python client.py __init__.py test_client.py test_session_config_e2e.py
Go client.go types.go client_test.go session_config_e2e_test.go
.NET Client.cs Types.cs SerializationTests.cs SessionConfigE2ETests.cs
Java SessionRequestBuilder.java + RPC types SessionConfig.java, ResumeSessionConfig.java SessionRequestBuilderTest.java SessionConfigE2ETest.java
Rust wire.rs types.rs ✅ (serialization in wire.rs)

No consistency issues found. The feature is added uniformly to both create and resume paths in every SDK, with equivalent API shapes (accounting for language naming conventions: sandboxConfig in camelCase SDKs, SandboxConfig in PascalCase SDKs, sandbox_config in snake_case SDKs). The shared E2E replay fixture (test/snapshots/session_config/should_apply_sandbox_config_on_create_and_resume.yaml) is used across all language-level E2E tests.

Generated by SDK Consistency Review Agent for #2371 · sonnet46 25.9 AIC · ⌖ 8.31 AIC · ⊞ 6.6K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants